import request from './base'
import glConfig from '../utils/config'
import store from '../store'
import { changeRowToFormData } from '../utils/utils'

let api = "/api"
let wsApi = "/wsApi"
let msgApi = "/msgApi"
if (process.env.NODE_ENV == 'production') {
  api = wsApi = msgApi = ''
}

const assetApi = {
  // 资产摆放位置 查询所有
  PlaceFindAll(params) {
    return request({
      url: `${wsApi}/quickoffice/api/assetPlace/findAll`,
      method: 'get',params
    })
  },
  // 资产摆放位置 删除
  PlaceRemove(params) {
    return request({
      url: `${wsApi}/quickoffice/api/assetPlace/remove`,
      method: 'get',
      params
    })
  },
  // 资产摆放位置 修改
  assetPlaceUpdate(data) {
    return request({
      url: `${wsApi}/quickoffice/api/assetPlace/update`,
      method: 'post',
      data: changeRowToFormData(data)
    })
  },
  // 资产摆放位置 新增
  assetPlaceAdd(data) {
    return request({
      url: `${wsApi}/quickoffice/api/assetPlace/add`,
      method: 'post',
      data: changeRowToFormData(data)
    })
  },
  
}

export default assetApi;